package com.kitty.mybatis.mybatisv1.session.defaults;

import com.kitty.mybatis.mybatisv1.session.KittyConfiguration;
import com.kitty.mybatis.mybatisv1.session.KittySqlSession;
import com.kitty.mybatis.mybatisv1.session.KittySqlSessionFactory;

/**
 * 默认的sqlsession工厂，用于创建s
 * @Author SHEN
 * @Date 2020/10/20
 */
public class kittyDefaultSqlSessionFactory implements KittySqlSessionFactory {

    private KittyConfiguration configuration;

    public kittyDefaultSqlSessionFactory(KittyConfiguration configuration) {
        this.configuration = configuration;
    }

    @Override
    public KittySqlSession openSqlSession() {
        return new KittyDefaultSqlSession(configuration);
    }
}
